package com.pucong.gitee.database.backup.common.selfenum;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("数据表备份状态枚举类")
public enum DatabaseTaskStatusEnum implements CommonEnum<Integer> {

    NOTSTART(0, "未开始"),
    START(1, "已开始"),
    END(2, "已结束");

    @ApiModelProperty(value = "key",example = "0")
    private Integer key;

    @ApiModelProperty("描述")
    private String desc;

    DatabaseTaskStatusEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    /**
     * 字典code
     *
     * @return
     */
    @Override
    public Integer getValue() {
        return this.key;
    }

    /**
     * 字典名称
     *
     * @return
     */
    @Override
    public String getName() {
        return this.name();
    }
}